<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../../inc/conn.asp"-->
<%
mobile=checkstr(inHTML(request.Form("mobile")))
typeid=checkstr(inHTML(request.Form("typeid")))
  '随机数字
  Dim mobileNum 
  Randomize Timer 
  mobileNum = int(899999 * Rnd + 100000)

if typeid="1" then	
  '短信息发送
  
  session("mobileNum")=mobileNum
  session("mobilePost")=mobile
end if

if typeid="2" then  
  NameSpace = "http://schemas.microsoft.com/cdo/configuration/"   '这个不能更改
  set Email = CreateObject("CDO.Message")  
  Email.From = "邮箱验证码<13559355277@163.com>"   '你自己的地址 
  Email.To = mobile      '收信人的地址
  Email.Subject = "邮箱验证码"
  Email.htmlbody = "验证码:"&mobileNum&"<br />"       '邮件的内容
  with Email.Configuration.Fields
  .Item(NameSpace&"sendusing") = 2
  .Item(NameSpace&"smtpserver") = "smtp.163.com"  '油箱服务器域名地址
  .Item(NameSpace&"smtpserverport") = 25
  .Item(NameSpace&"smtpauthenticate") = 1
  .Item(NameSpace&"sendusername") = "13559355277@163.com"     '自己油箱的用户名
  .Item(NameSpace&"sendpassword") = "z123456"      '密码
  .Update
  end with
  Email.Send 
  session("mobileNum")=mobileNum
  session("mobilePost")=mobile
end if
%>